home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
mscfunct
/
crt.doc
< prev
next >
Wrap
Text File
|
1987-05-09
|
2KB
|
84 lines
CRT Support functions for Microsoft C
#include <crt.h>
void crt_cls( );
int page;
int crt_get_mode();
int crt_get_page();
void crt_home( page );
int page;
void crt_line( x1, y1, x2, y2, color );
int x1, y1, x2, y2, color;
void crt_place_cursor( row, column, page );
int row, column, page;
int crt_read_pixel( x, y );
int x, y;
void crt_scroll( top, bottom, left, right, lines );
int top, bottom, left, right, lines;
void crt_set_mode( mode );
int mode;
void crt_set_page( page );
int page;
void crt_where( row, column, page );
int *row, *column, page;
void crt_write_pixel( x, y, color );
int x, y, color;
o Descriptions
crt_cls clears the screen on the PC and locates the cursor in the upper
left corner of page 0.
crt_get_mode returns the video mode of the PC.
crt_get_page returns the current active video page.
crt_home positions the cursor to the upper left corner of the given page.
crt_line draws a line in the given color from pixel x1,y1 to pixel x2,y2,
crt_place_cursor positions the cursor in the given row and column on the
given page.
crt_read_pixel returns the color of the pixel at x,y.
crt_scroll scrolls a portion of the screen between the given top and bottom
rows and the given left and right columns up the given amount of lines (down
if lines is negative).
crt_set_mode sets the video mode to the specified value.
crt_set_page switches the active page to the specified page.
crt_where returns the row and column location of the cursor on the given page.
crt_write_pixel changes the pixel at x,y to the given color.
NOTES
-----
Video modes:
mode meaning video pages
---- ------- -----------
0 40 by 25 B&W 0 through 7
1 40 by 25 color 0 through 7
2 80 by 25 B&W 0 through 3
3 80 by 25 color 0 through 3
4 320 by 200 color (40 by 25 text) 0 only
5 320 by 200 B&W (40 by 25 text) 0 only
6 640 by 200 B&W (80 by 25 text) 0 only
7 80 by 25 B&W card 0 only